/**
 * Copyright (c) iwindplus Technologies Co., Ltd.2024-2030, All rights reserved.
 */

package com.iwindplus.setup.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 对象存储上传（字节数组）数据传输对象.
 *
 * @author zengdegui
 * @since 2018/9/1
 */
@Schema(description = "对象存储上传（字节数组）数据传输对象")
@SuperBuilder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OssUploadByteDTO implements Serializable {

    /**
     * 模板编码（必填）.
     */
    @Schema(description = "模板编码")
    @NotBlank(message = "{tplCode.notEmpty}")
    private String tplCode;

    /**
     * 字节数组（必填）.
     */
    @Schema(description = "字节数组")
    @NotEmpty(message = "{data.notEmpty}")
    private Byte[] data;

    /**
     * 存储目录前缀（必填）.
     */
    @Schema(description = "存储目录前缀")
    @NotBlank(message = "{prefix.notEmpty}")
    private String prefix;

    /**
     * 源文件名（必填）.
     */
    @Schema(description = "源文件名")
    @NotBlank(message = "{sourceFileName.notEmpty}")
    private String sourceFileName;

    /**
     * 是否重命名文件名（可选，默认：true）.
     */
    @Schema(description = "是否重命名文件名")
    private Boolean renamed;
}
